home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 April / EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso / EARCD / comm / mmgr / MM_StarTrack.lha / MM / Rexx / MM_SetLogPre.rexx next >
OS/2 REXX Batch file  |  1996-03-04  |  690b  |  42 lines

  1. /* 04.03.96 RH */
  2.  
  3. parse arg mode pfx
  4.  
  5. mode    = upper(mode)
  6. pfx        = compress(strip(pfx), '"')
  7. clip    = 'MM_LogPre'
  8.  
  9. select
  10.     when mode=''            then    say        'The current prefix is "'getclip(clip)'".'
  11.     when mode='ADD'        then    call    Set_Pfx(getclip(clip) || pfx)
  12.     when mode='RESET'    then    call    Set_Pfx()
  13.     when mode='SHOW'    then    say        getclip(clip)
  14.     when mode='SET'        then    call    Set_Pfx(pfx)
  15.  
  16.     otherwise
  17.         do
  18.             if mode~='?' then say '*** Unknown mode "'mode'"! ***'
  19.  
  20.             say
  21.             say ' Usage: [RX] MM_SetLogPre[.rexx] ADD/K,SET/K,RESET/S,SHOW/S'
  22.             say
  23.             exit 10
  24.         end
  25. end
  26.  
  27. exit 0
  28.  
  29.  
  30.  
  31. Set_Pfx: procedure Expose clip
  32.  
  33.     parse arg pfx
  34.  
  35.     call setclip(clip, pfx)
  36.  
  37.     say 'The prefix was set to "'getclip(clip)'".'
  38.  
  39. return
  40.  
  41.  
  42.